#include "Thread.h"

#include <chrono>
#include <thread>

namespace yzrilyzr_lang{
	Thread::Thread(yzrilyzr_lang_thread_handle h) :mHandle(h){}
	void Thread::sleep(int64_t millis){
		std::this_thread::sleep_for(std::chrono::milliseconds(millis));
	}
	void Thread::sleep(int64_t millis, int64_t nanos){
		std::this_thread::sleep_for(std::chrono::milliseconds(millis)+std::chrono::nanoseconds(nanos));
	}
	void Thread::yield(){
		std::this_thread::yield();
	}
}